#!/bin/bash
# Self-generating list of files which are important to the game.
# Lines starting with "#./" are files to be checked for presence by the
# program itself. Everything else is part of the script.
# Executing this file as a shell script regenerates the file list from
# actual files in the directory tree (especially data/) and rewrites
# itself accordingly.
TEMP1=`tempfile`
TEMP2=`tempfile`
find data -path "*.svn*" -prune -o -true -type f ! -wholename $0 -print > $TEMP1
\ls -1 LICENSE* >> $TEMP1
cat $0 | grep -E -v "^#\./.*" > $TEMP2
cat $TEMP1 | sed "s%^%#./%" >> $TEMP2
cp $TEMP2 $0
rm $TEMP1 $TEMP2
#./data/font/sans.tga
#./data/font/sans_damage.tga
#./data/font/sans10_numbers.tga
#./data/gfx/mainmenu.tga
#./data/gfx/p5_sprites.tga
#./data/gfx/diamond_burst1.tga
#./data/gfx/graphicsheet.png
#./data/gfx/cursor.tga
#./data/gfx/diamond_burst.tga
#./data/gfx/tiles0.tga
#./data/gfx/npcs.tga
#./data/gfx/ingame_gui.tga
#./data/gfx/p7_sprites.tga
#./data/gfx/p8_sprites.tga
#./data/gfx/hiteffects.tga
#./data/gfx/items.tga
#./data/gfx/p1_sprites.tga
#./data/gfx/p2_sprites.tga
#./data/gfx/p4_sprites.tga
#./data/gfx/tiles3.tga
#./data/gfx/all_chars.png
#./data/gfx/weapons/wep15.tga
#./data/gfx/weapons/wep8.tga
#./data/gfx/weapons/wep38.tga
#./data/gfx/weapons/wep42.tga
#./data/gfx/weapons/wep14.tga
#./data/gfx/weapons/wep27.tga
#./data/gfx/weapons/wep2.tga
#./data/gfx/weapons/wep43.tga
#./data/gfx/weapons/wep17.tga
#./data/gfx/weapons/wep18.tga
#./data/gfx/weapons/wep34.tga
#./data/gfx/weapons/wep33.tga
#./data/gfx/weapons/wep29.tga
#./data/gfx/weapons/wep30.tga
#./data/gfx/weapons/wep40.tga
#./data/gfx/weapons/wep44.tga
#./data/gfx/weapons/wep24.tga
#./data/gfx/weapons/wep36.tga
#./data/gfx/weapons/wep3.tga
#./data/gfx/weapons/wep5.tga
#./data/gfx/weapons/wep13.tga
#./data/gfx/weapons/wep16.tga
#./data/gfx/weapons/wep4.tga
#./data/gfx/weapons/wep23.tga
#./data/gfx/weapons/wep20.tga
#./data/gfx/weapons/wep31.tga
#./data/gfx/weapons/wep11.tga
#./data/gfx/weapons/wep35.tga
#./data/gfx/weapons/wep21.tga
#./data/gfx/weapons/wep28.tga
#./data/gfx/weapons/wep6.tga
#./data/gfx/weapons/wep39.tga
#./data/gfx/weapons/wep10.tga
#./data/gfx/weapons/wep32.tga
#./data/gfx/weapons/wep25.tga
#./data/gfx/weapons/wep12.tga
#./data/gfx/weapons/wep7.tga
#./data/gfx/weapons/wep22.tga
#./data/gfx/weapons/wep26.tga
#./data/gfx/weapons/wep37.tga
#./data/gfx/weapons/wep19.tga
#./data/gfx/weapons/wep41.tga
#./data/gfx/weapons/wep1.tga
#./data/gfx/weapons/wep9.tga
#./data/gfx/diamond.tga
#./data/gfx/tiles2.tga
#./data/gfx/tiles1.tga
#./data/gfx/objects.tga
#./data/gfx/tileset.tga
#./data/gfx/p9_sprites.tga
#./data/gfx/gui.tga
#./data/gfx/diamond_sparkles.tga
#./data/gfx/p6_sprites.tga
#./data/gfx/lobby.tga
#./data/gfx/p3_sprites.tga
#./data/gfx/item_pickup.tga
#./LICENSE
#./LICENSE.CC
#./LICENSE.MIT
